package TeamR3.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import TeamR3.dao.UserDao;
import TeamR3.entity.User;
import TeamR3.service.UserService;

@Service("userService")
public class UserServiceImpl implements UserService {
	@Autowired
	private UserDao userDao;
	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	}
	@Override
	public List<User> queryAllUsers() {
		return userDao.queryAllUsers();
	}
	@Override
	public User getUser(String user_name,String user_password){
		return userDao.getUser(user_name, user_password);
	}
	@Override
	public int addUser(String user_name, int user_privilege,
			String user_password) {
		return userDao.addUser(user_name, user_privilege, user_password);
	}
	@Override
	public int modifyUser(String user_name, int user_privilege,
			String user_password) {
		return userDao.modifyUser(user_name, user_privilege, user_password);
	}
	@Override
	public int delUser(String user_name) {
		return userDao.delUser(user_name);
	}
}
